import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class UserServiceProxy implements UserService {
  private static final Logger LOG = LoggerFactory.getLogger(UserServiceImpl.class);
  private UserService userService;// 代理对象
  public UserServiceProxy(UserService us){
    super();
    userService = us;
  }

  @Override
  public void insertUser(User user) {
    LOG.info("事务开始处理");
    userService.insertUser(user);
    LOG.info("事务结束");
  }
}
